-
Notifications
You must be signed in to change notification settings - Fork 9.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds support for PRIVATE endpoint type for aws_api_gateway_rest_api #4888
Adds support for PRIVATE endpoint type for aws_api_gateway_rest_api #4888
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @edsonmarquezani, thanks for submitting this! 🚀
As detailed below, I will go ahead and make the more advanced testing adjustments in a commit after yours so we can get this released today and continue to support GovCloud (US) testing with this resource.
@@ -203,6 +203,24 @@ func TestAccAWSAPIGatewayRestApi_EndpointConfiguration(t *testing.T) { | |||
}, | |||
}, | |||
}) | |||
|
|||
resource.Test(t, resource.TestCase{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We generally prefer to create whole new top level acceptance test functions instead of adding multiple resource.Test()
within the same function -- this allows us to parallelize our testing better. 😄
Another complicated piece to our API Gateway testing here is that we run the service testing across multiple AWS partitions (Commercial and GovCloud (US)), which the latter may or may not support the new PRIVATE
REST API endpoint type. If you look at the TestStep
above your addition here, we have a PreConfig
function that ensures the AWS API Gateway service its calling supports the EDGE
endpoint type or skips the rest of the test. We'll want to add something similar for PRIVATE
as well.
Do not be discouraged here though! There just happens to be more advanced testing handling with this resource testing than other parts of our resource testing. You actually were on the right track except the tweaks mentioned above, which I can handle in a commit after yours to expedite releasing this enhancement for everyone. 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I get it. I just didn't know private type might not be supported in some regions.
As for the remaing, I understand you're going to make the adjustments yourself, right? Anyway, feel free to ask for it, if you want to. I think I could handle it. ;)
This has been released in version 1.24.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
Changes proposed in this pull request:
[1] https://aws.amazon.com/blogs/compute/introducing-amazon-api-gateway-private-endpoints/
Output from acceptance testing:
Comments
My Golang knowledge is vey limited, but instead of asking for this feature, I thought I could do it myself and contribute. The change is quite simple, yet I'm not sure the acceptance test I added is correct. Please tell me if not.
I built and tested it and it works.